package com.zl.autocode.common.constant;

import com.zl.common.enums.code.GlobalDictEnum;
import com.zl.common.enums.code.IDictEnum;

/**
 * 
 * @author zhouliang
 *
 */
public class ZLCfgGenerateEnum extends GlobalDictEnum {
    
    /** 代码生成模式*/
    public enum GENERATE_TYPE implements IDictEnum{
        
        GT1("1", "独立"),
        GT2("2", "联动"),
        
        ;
        private String code;
        private String msg;

        GENERATE_TYPE(String code, String msg) {
            this.code = code;
            this.msg = msg;
        }
        @Override
        public String getCode() {
            return code;
        }
        @Override
        public String getMsg() {
            return msg;
        }
        
        public static String msg(String code) {
            for (GENERATE_TYPE m : GENERATE_TYPE.values()) {
                if (m.getCode().equalsIgnoreCase(code)) {
                    return m.getMsg();
                }
            }
            return null;
        }
    }
}
